#include <stdio.h>
int main()
{
        int p,r,n,m,temp;
        printf("give me 2 positive integers:n,m:");
        scanf("%d,%d,",&n,&m);
        if(n<m)
        {
                temp=n;
                n=m;
                m=temp;
        }
        p=n*m;
        while(m!=0)
        {r=n%m;
         n=m;
         m=r;
        }
        printf("their greatest common divisor is:%d\n",n);
        printf("their least common multiple is:%d\n",p/n);
        return 0;
}